require "import"
import "android.widget.Button"
import "android.widget.LinearLayout"
import "com.androlua.LuaDialog"
import "android.content.Intent"
import "android.R"
import "android.view.View"
import "android.widget.AdapterView"
import "android.widget.ArrayAdapter"
import "android.widget.Button"
import "android.widget.EditText"
import "android.widget.LinearLayout"
import "android.widget.ListView"
import "android.widget.TextView"
import "com.androlua.LuaDialog"


layout={
  LinearLayout,
  layout_width="match_parent",
  layout_height="match_parent",
  orientation=1,

  {
    LinearLayout,
    orientation=0,
    layout_width="match_parent",

    {
      TextView,
      id = "textview",
      text = "التعرف",
onClick=function()

end,

      layout_width = "match_parent",
      layout_height = "wrap_content",
      background="#ff000000",
      textColor="#f0f8ff",
      textSize = "50sp",
      gravity = "center",
    },
  },

  {
    LinearLayout,
    orientation=0,
    layout_width="match_parent",

    {
      Button,
      text="Be My Eyes",
onClick=function(v)
        dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  app_pkg="com.bemyeyes.bemyeyes"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot( {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
service.click({{"<#loadingIndicator>20", "<#addPictureButton>60$600","%上个焦点", }})
end)        end,
onLongClickListener = {
    onLongClick = function(v)
dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  node=service.getFocusView()
  app_pkg="com.bemyeyes.bemyeyes"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot(node, {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
service.click({{"<#loadingIndicator>20", "<#addPictureButton>60$600","%上个焦点", }})
end)
        return true 
    end},
      textSize="11sp",
background="#005aee",
      textColor="#ffffffff",
      layout_width="0dp",
      layout_weight=1,
    },


    {
      Button,
      text="Envision AI",
onClick=function(v)
        dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  app_pkg="com.letsenvision.envisionai"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot( {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)

service.click({{"%朗读/ $4000", "Envision AI>25",}})
end)        end,
onLongClickListener = {
    onLongClick = function(v)
dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  node=service.getFocusView()
app_pkg="com.letsenvision.envisionai"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot(node, {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)

service.click({{"%朗读/ $4000", "Envision AI>25",}})
end)
        return true 
    end},

      textSize="11sp",
background="#ffffffff",
textColor="#ff000000",
      layout_width="0dp",
      layout_weight=1,
    },

    {
      Button,
      text="jieshuo AI",
onClick=function(v)
        dlg.dismiss()
task(500,function()
service.execute("图像理解全屏")
end)        end,
onLongClickListener = {
    onLongClick = function(v)
dlg.dismiss()
task(500,function()
service.execute("图像理解")
end)
        return true 
    end},
      textSize="11sp",
background="#4e6c9f",
      textColor="#ffffffff",
      layout_width="0dp",
      layout_weight=1,
    },

    {
      Button,
      text="Lookout",
onClick=function(v)
        dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  app_pkg="com.google.android.apps.accessibility.reveal"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot( {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
end)        end,
onLongClickListener = {
    onLongClick = function(v)
dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  node=service.getFocusView()
app_pkg="com.google.android.apps.accessibility.reveal"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot(node, {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
end)
        return true 
    end},
      textSize="11sp",
      background="#4859b8",
      textColor="#ffffffff",
      layout_width="0dp",
      layout_weight=1,
    },
  },

  {
    LinearLayout,
    orientation=0,
    layout_width="match_parent",
    {
      Button,
      text="Seeing AI",
onClick=function(v)
        dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  app_pkg="com.microsoft.seeingai"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot( {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
service.click({{"#more_info_button_three>25", "#gpt_moreinfo_textview>75",}})
end)        end,
onLongClickListener = {
    onLongClick = function(v)
dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  node=service.getFocusView()
app_pkg="com.microsoft.seeingai"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot(node, {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
service.click({{"#more_info_button_three>25", "#gpt_moreinfo_textview>75",}})
end)
        return true 
    end},
      textSize="11sp",
      background="#14a3cb",
      textColor="#ffffffff",
      layout_width="0dp",
      layout_weight=1,
    },

    {
      Button,
      text="Tech-Freedom",
onClick=function(v)
        dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  app_pkg="com.videvelopers.app.tech_freedom"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot( {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
service.click({{"Scene Description by Tech-Freedom>10","#scene_info_tv_description>70"}})
end)        end,
onLongClickListener = {
    onLongClick = function(v)
dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  node=service.getFocusView()
app_pkg="com.videvelopers.app.tech_freedom"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot(node, {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
end)
service.click({{"Scene Description by Tech-Freedom>10","#scene_info_tv_description>70"}})
        return true 
    end},
      textSize="11sp",
      background="#0d649c",
      textColor="#ffffffff",
      layout_width="0dp",
      layout_weight=1,
    },

    {
      Button,
      text="Sullivan Finder",
onClick=function(v)
        dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  app_pkg="kr.tuat.sullivanfinder"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot( {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
end)        end,
onLongClickListener = {
    onLongClick = function(v)
dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  node=service.getFocusView()
app_pkg="kr.tuat.sullivanfinder"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot(node, {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
end)
        return true 
    end},
      textSize="11sp",
      background="#f36465",
      textColor="#ffffffff",
      layout_width="0dp",
      layout_weight=1,
    },
    {
      Button,
      text="Lens",
onClick=function(v)
        dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  app_pkg="com.google.android.googlequicksearchbox"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot( {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
end)        end,
onLongClickListener = {
    onLongClick = function(v)
dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  node=service.getFocusView()
app_pkg="com.google.android.googlequicksearchbox"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot(node, {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
end)
        return true 
    end},
      textSize="11sp",
background="#ffffffff",
textColor="#ff000000",
      layout_width="0dp",
      layout_weight=1,
    },
  },
  {
    LinearLayout,
    orientation=0,
    layout_width="match_parent",
    {
      Button,
      text="InstaReader",
onClick=function(v)
        dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  app_pkg="com.suyam.instareader"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot( {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
service.click({{"قراءة الكتاب الصوتي|Read Audiobook>60"}})
end)        end,
onLongClickListener = {
    onLongClick = function(v)
dlg.dismiss()
task(500,function()
  require "import"
  import "android.content.Intent"
  import "android.graphics.Bitmap"
  import "android.net.Uri"
  import "java.io.File"
  import "java.io.FileOutputStream"

  service.playSoundTick()
  node=service.getFocusView()
app_pkg="com.suyam.instareader"
  store_url="market://details?id="
  task(500, function()
    if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
      this.getScreenShot(node, {
        onScreenCaptureDone = function(A0_4)
          A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
          this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
          return true
      end})
     else
      this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
    end
  end)
service.click({{"قراءة الكتاب الصوتي|Read Audiobook>60"}})
end)
        return true 
    end},
      textSize="11sp",
      background="#facb63",
      textColor="#ffffffff",

      layout_width="0dp",
      layout_weight=1,
    },
    {
      Button,
      text="jieshuo text",
onClick=function(v)
        dlg.dismiss()
task(500,function()
service.execute("文字识别")
end)        end,
onLongClickListener = {
    onLongClick = function(v)
dlg.dismiss()
task(500,function()
service.execute("焦点识别")
end)
        return true 
    end},
      textSize="11sp",
background="#4e6c9f",
      textColor="#ffffffff",

      layout_width="0dp",
      layout_weight=1,
    },
    {
      Button,
      text="Virtual screen",
onClick=function(v)
        dlg.dismiss()
task(500,function()
service.execute("虚拟屏幕")
end)        end,
onLongClickListener = {
    onLongClick = function(v)
dlg.dismiss()
task(500,function()
service.execute("验证码")
end)
        return true 
    end},
      textSize="11sp",
background="#4e6c9f",
      textColor="#ffffffff",
      layout_width="0dp",
      layout_weight=1,
    },
    {
      Button,
      text="jieshuo Camera",
onClick=function(v)
        dlg.dismiss()
task(500,function()
service.execute("解说相机")
end)        end,
onLongClickListener = {
    onLongClick = function(v)
dlg.dismiss()
task(500,function()
-- كاميرا vr.  
require 'import' import "android.content.*" i= Intent()  .setComponent(ComponentName( "com.nirenr.talkman", "com.nirenr.talkman.CameraActivity2"))  this.startActivity(i)  
end)
        return true 
    end},
      textSize="11sp",
background="#4e6c9f",
      textColor="#ffffffff",
      layout_width="0dp",
      layout_weight=1,
    },

  },

}

dlg=LuaDialog()
dlg.setView(loadlayout(layout))
dlg.show()